﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class box : MonoBehaviour
{
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.layer == 8)
        {
            GameController.instance.rocket.GetComponent<rocket>().vspeed = Vector3.Reflect(GameController.instance.rocket.GetComponent<rocket>().vspeed, transform.forward);
            other.GetComponent<rocket>().HIT();
        }
    }
}
